package com.reading.service.impl;

import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.reading.mapper.PayMapper;
import com.reading.pojo.Recharge;
import com.reading.service.PayService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class PayServiceImpl implements PayService {
    @Autowired
    private PayMapper payMapper;

    @Override
    public PageInfo<Recharge> paylist(Recharge recharge, Integer pageNo, Integer pageSize) {
        PageHelper.startPage(pageNo,pageSize);
        List<Recharge> rechargeList = payMapper.paylist(recharge);
        PageInfo pageInfo = new PageInfo<>(rechargeList);
        return pageInfo;
    }
}
